package com.lin.boot.aop;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.stereotype.Component;

/**
 * @author linjiang
 * @date 2024/5/8
 * @fn
 */
@Component
public class CustomMethodInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("方法执行之前被拦截。。。。。。");
        return invocation.proceed();
    }

}
